<?php
namespace app\admin\model;

use think\Model;

class Admin extends Model
{   
	protected $connection = 'publicdata';
	/*查询数据 */
	public function get_data($username){
        $data=Admin::where([['username','=',$username],['status','=',1]])->find();
        return $data;
	}
	public function insert_data(){

	}
	/*修改*/
	public function update_data($username,$pwd){
		$update = Admin::where('username',$username)->find();
		$update->password = $pwd;
		$update->save();
        return $update;
	}
	public function delete_data(){

	}
}